<!--
 * @Description: 
 * @Author: dh
 * @Date: 2021-08-19 17:18:39
 * @LastEditors: dh
 * @LastEditTime: 2021-09-15 13:36:41
-->
<!-- B.html -->
<!doctype html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>B</title>
	</head>

	<body>
		<h1>a1 子页面</h1>
		<span></span>
		<script>
			// 子页面A
			let iframeBWin = window.parent.$id('a2').contentWindow;
			iframeBWin.onload = function () {
				iframeBWin.document.getElementById('show').innerHTML = '来自子页面a1的问候';
			};
		</script>
	</body>
</html>
